<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\admin\model\Banner as BannerModel;

class Banner extends Api
{
    protected $noNeedRight = '*';
    protected $noNeedLogin = ['list'];

    public function _initialize()
    {
        parent::_initialize();
    }

    public function list()
    {
        $this->success("success", BannerModel::where(['status' => 1, 'deletetime' => null])->field("id,image,name as title,type,skip_id")->order(['sort' => 'desc'])->select());
    }
}
